package com.tyd.cams;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;

import android.os.Bundle;
import android.widget.Button;

import com.google.android.material.tabs.TabLayout;
import com.tyd.cams.Adapter.FragmentPAdapter;
import com.tyd.cams.guide.GuideBFragment;
import com.tyd.cams.guide.GuideAFragment;
import com.tyd.cams.guide.GuideCFragment;

public class GuideActivity extends AppCompatActivity {
    private ViewPager viewPager;
    private TabLayout tabLayout;
    Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        viewPager = findViewById(R.id.ViewPager);
        tabLayout = findViewById(R.id.tabLayout);
        FragmentPAdapter fragmentPAdapter = new FragmentPAdapter(getSupportFragmentManager());
        fragmentPAdapter.add(new GuideAFragment(), "");
        fragmentPAdapter.add(new GuideBFragment(), "");
        fragmentPAdapter.add(new GuideCFragment(), "");
        viewPager.setAdapter(fragmentPAdapter);
        tabLayout.setupWithViewPager(viewPager);
    }
}